﻿using System;

namespace Wisdom.Core
{
    /// <summary>
    /// 描述：当Castle动态代理为类创建代理对象时，类需要有被拦截的接口
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple=true, Inherited=false)]
    public class AdditionalInterfaceToProxyAttribute : Attribute
    {
        #region Public Properties
        /// <summary>
        /// 获得或设置 当代理对象被创建时可被用作拦截接口的类型
        /// </summary>
        public Type InterfaceType { get; set; }
        #endregion

        #region Ctor
        /// <summary>
        /// 构造函数：初始化一个人 <c>AdditionalInterfaceToProxyAttribute</c>类实例.
        /// </summary>
        /// <param name="intfType">当代理对象被创建时可被用作拦截接口的类型.</param>
        public AdditionalInterfaceToProxyAttribute(Type intfType)
        {
            this.InterfaceType = intfType;
        }
        #endregion
    }
}
